<template>
    <el-form :inline="true" :model="form" size="mini">
        <el-form-item label="招聘标题">
            <el-input v-model="form.title"></el-input>
        </el-form-item>
        <el-form-item label="发布时间" class="date_item">
            <el-date-picker
                v-model="form.date"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
            ></el-date-picker>
        </el-form-item>
        <el-form-item label="活动区域">
            <el-select v-model="form.reptileClass" placeholder="爬虫类型">
                <el-option label="全部" value></el-option>
                <el-option
                    v-for="(item, index) in options"
                    :key="index"
                    :label="item.name"
                    :value="item.type"
                ></el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="query">查询</el-button>
        </el-form-item>
    </el-form>
</template>
<script>
import { fetchPost } from '../../../http';
export default {
    data() {
        return {
            options: new Array()
        }
    },
    props: {
        form: {
            title: String,
            date: Object,
            startDate: Number,
            endDate: Number,
            reptileClass: String
        }
    },
    created() {
        this.loadOption();
    },
    methods: {
        query() {
            
        },
        loadOption() {
            let self = this;
            fetchPost("/workBug/getOption").then(res => {
                self.options = res.data;
            });
        }
    }
};
</script>
